package cn.com.nes.mybatis.agent.project.mapper;

import cn.com.nes.mybatis.agent.project.entity.ProjectCustomerRelationship;
import cn.com.nes.site.entity.bo.project.ProjectCustomerRelationshipPageBO;
import cn.com.nes.site.service.project.dto.ProjectCustomerRelationCountDTO;
import cn.com.nes.site.service.project.dto.ProjectRelationshipDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author yishuai
 */
public interface ProjectCustomerRelationshipMapper extends BaseMapper<ProjectCustomerRelationship> {

    List<ProjectRelationshipDTO> getRelationshipsExcludeMain(Page<ProjectRelationshipDTO> page,
           @Param("bo") ProjectCustomerRelationshipPageBO bo);


    void deleteImportCustomer(@Param("projectUuid") String projectUuid, @Param("operateUserId") Long operateUserId, @Param("operateDate") Date operateDate);

    List<String> getCustomerIdListByXzqhdm(@Param("projectUuid") String projectUuid, @Param("xzqhdm") String xzqhdm);

    void deleteImportCustomerByCustomerId(@Param("customerIdList") List<String> customerIdList, @Param("operateUserId") Long operateUserId, @Param("operateDate") Date operateDate);

    void deleteOpportunityId(@Param("opportunityIdList") List<String> opportunityIdList, @Param("mainOpportunityId")String opportunityId,@Param("operateUserId") Long operateUserId, @Param("operateDate") Date operateDate);
    List<ProjectCustomerRelationCountDTO> getCustomerCountOfProjectExcludeMain(@Param("uuids") List<String> projectUuids);
    void updateRelationshipsByMainCustomerId(@Param("projectUuid")String projectUuid, @Param("mainOpportunityId")String opportunityId, @Param("operateUserId") Long operateUserId, @Param("operateDate") Date operateDate);
}




